/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    cn-hangzhou = 'cloudwf.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('cloudwifi-pop', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddApListToApgroupRequest {
  apGroupId?: string(name='ApGroupId'),
  apMacList?: map[string]any(name='ApMacList'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model AddApListToApgroupShrinkRequest {
  apGroupId?: string(name='ApGroupId'),
  apMacListShrink?: string(name='ApMacList'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model AddApListToApgroupResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model AddApListToApgroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddApListToApgroupResponseBody(name='body'),
}

async function addApListToApgroupWithOptions(tmpReq: AddApListToApgroupRequest, runtime: Util.RuntimeOptions): AddApListToApgroupResponse {
  Util.validateModel(tmpReq);
  var request = new AddApListToApgroupShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.apMacList)) {
    request.apMacListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.apMacList, 'ApMacList', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.apGroupId)) {
    query['ApGroupId'] = request.apGroupId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.apMacListShrink)) {
    body['ApMacList'] = request.apMacListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddApListToApgroup',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addApListToApgroup(request: AddApListToApgroupRequest): AddApListToApgroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return addApListToApgroupWithOptions(request, runtime);
}

model DelApThirdAppRequest {
  apAssetId?: long(name='ApAssetId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  id?: long(name='Id'),
  mac?: string(name='Mac'),
}

model DelApThirdAppResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model DelApThirdAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DelApThirdAppResponseBody(name='body'),
}

async function delApThirdAppWithOptions(request: DelApThirdAppRequest, runtime: Util.RuntimeOptions): DelApThirdAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apAssetId)) {
    query['ApAssetId'] = request.apAssetId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DelApThirdApp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function delApThirdApp(request: DelApThirdAppRequest): DelApThirdAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return delApThirdAppWithOptions(request, runtime);
}

model DeleteApSsidConfigRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  radioIndex?: string(name='RadioIndex'),
  ssid?: string(name='Ssid'),
}

model DeleteApSsidConfigResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model DeleteApSsidConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteApSsidConfigResponseBody(name='body'),
}

async function deleteApSsidConfigWithOptions(request: DeleteApSsidConfigRequest, runtime: Util.RuntimeOptions): DeleteApSsidConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.radioIndex)) {
    query['RadioIndex'] = request.radioIndex;
  }
  if (!Util.isUnset(request.ssid)) {
    query['Ssid'] = request.ssid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApSsidConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteApSsidConfig(request: DeleteApSsidConfigRequest): DeleteApSsidConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApSsidConfigWithOptions(request, runtime);
}

model DeleteApgroupConfigRequest {
  apGroupUUId?: string(name='ApGroupUUId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model DeleteApgroupConfigResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model DeleteApgroupConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteApgroupConfigResponseBody(name='body'),
}

async function deleteApgroupConfigWithOptions(request: DeleteApgroupConfigRequest, runtime: Util.RuntimeOptions): DeleteApgroupConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apGroupUUId)) {
    query['ApGroupUUId'] = request.apGroupUUId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApgroupConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteApgroupConfig(request: DeleteApgroupConfigRequest): DeleteApgroupConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApgroupConfigWithOptions(request, runtime);
}

model DeleteApgroupSsidConfigRequest {
  apgroupId?: long(name='ApgroupId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  id?: long(name='Id'),
}

model DeleteApgroupSsidConfigResponseBody = {
  data?: {
    id?: long(name='Id'),
    taskId?: string(name='TaskId'),
  }(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model DeleteApgroupSsidConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteApgroupSsidConfigResponseBody(name='body'),
}

async function deleteApgroupSsidConfigWithOptions(request: DeleteApgroupSsidConfigRequest, runtime: Util.RuntimeOptions): DeleteApgroupSsidConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApgroupSsidConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteApgroupSsidConfig(request: DeleteApgroupSsidConfigRequest): DeleteApgroupSsidConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApgroupSsidConfigWithOptions(request, runtime);
}

model DeleteApgroupThirdAppRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  id?: long(name='Id'),
}

model DeleteApgroupThirdAppResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model DeleteApgroupThirdAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteApgroupThirdAppResponseBody(name='body'),
}

async function deleteApgroupThirdAppWithOptions(request: DeleteApgroupThirdAppRequest, runtime: Util.RuntimeOptions): DeleteApgroupThirdAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApgroupThirdApp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteApgroupThirdApp(request: DeleteApgroupThirdAppRequest): DeleteApgroupThirdAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApgroupThirdAppWithOptions(request, runtime);
}

model DeleteNetDeviceInfoRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  ids?: string(name='Ids'),
  requestId?: string(name='RequestId'),
}

model DeleteNetDeviceInfoResponseBody = {
  data?: [ long ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model DeleteNetDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteNetDeviceInfoResponseBody(name='body'),
}

async function deleteNetDeviceInfoWithOptions(request: DeleteNetDeviceInfoRequest, runtime: Util.RuntimeOptions): DeleteNetDeviceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.ids)) {
    query['Ids'] = request.ids;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNetDeviceInfo',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteNetDeviceInfo(request: DeleteNetDeviceInfoRequest): DeleteNetDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNetDeviceInfoWithOptions(request, runtime);
}

model EditApgroupThirdAppRequest {
  apgroupId?: long(name='ApgroupId'),
  appCode?: string(name='AppCode'),
  appData?: string(name='AppData'),
  appName?: string(name='AppName'),
  applyToSubGroup?: int32(name='ApplyToSubGroup'),
  category?: int32(name='Category'),
  configType?: string(name='ConfigType'),
  id?: long(name='Id'),
  inheritParentGroup?: int32(name='InheritParentGroup'),
  thirdAppName?: string(name='ThirdAppName'),
}

model EditApgroupThirdAppResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model EditApgroupThirdAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EditApgroupThirdAppResponseBody(name='body'),
}

async function editApgroupThirdAppWithOptions(request: EditApgroupThirdAppRequest, runtime: Util.RuntimeOptions): EditApgroupThirdAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appData)) {
    query['AppData'] = request.appData;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.applyToSubGroup)) {
    query['ApplyToSubGroup'] = request.applyToSubGroup;
  }
  if (!Util.isUnset(request.category)) {
    query['Category'] = request.category;
  }
  if (!Util.isUnset(request.configType)) {
    query['ConfigType'] = request.configType;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.inheritParentGroup)) {
    query['InheritParentGroup'] = request.inheritParentGroup;
  }
  if (!Util.isUnset(request.thirdAppName)) {
    query['ThirdAppName'] = request.thirdAppName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EditApgroupThirdApp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function editApgroupThirdApp(request: EditApgroupThirdAppRequest): EditApgroupThirdAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return editApgroupThirdAppWithOptions(request, runtime);
}

model EffectApConfigRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model EffectApConfigResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model EffectApConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EffectApConfigResponseBody(name='body'),
}

async function effectApConfigWithOptions(request: EffectApConfigRequest, runtime: Util.RuntimeOptions): EffectApConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EffectApConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function effectApConfig(request: EffectApConfigRequest): EffectApConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return effectApConfigWithOptions(request, runtime);
}

model EffectApgroupConfigRequest {
  apGroupUUId?: string(name='ApGroupUUId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model EffectApgroupConfigResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model EffectApgroupConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EffectApgroupConfigResponseBody(name='body'),
}

async function effectApgroupConfigWithOptions(request: EffectApgroupConfigRequest, runtime: Util.RuntimeOptions): EffectApgroupConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apGroupUUId)) {
    query['ApGroupUUId'] = request.apGroupUUId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'EffectApgroupConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function effectApgroupConfig(request: EffectApgroupConfigRequest): EffectApgroupConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return effectApgroupConfigWithOptions(request, runtime);
}

model GetApAddressByMacRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  language?: string(name='Language'),
  mac?: string(name='Mac'),
}

model GetApAddressByMacResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApAddressByMacResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApAddressByMacResponseBody(name='body'),
}

async function getApAddressByMacWithOptions(request: GetApAddressByMacRequest, runtime: Util.RuntimeOptions): GetApAddressByMacResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApAddressByMac',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApAddressByMac(request: GetApAddressByMacRequest): GetApAddressByMacResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApAddressByMacWithOptions(request, runtime);
}

model GetApAssetRequest {
  apMac?: string(name='ApMac', example='14:15:14:15:14:15'),
  appCode?: string(name='AppCode', example='XXXIIII'),
  appName?: string(name='AppName', example='ISV'),
}

model GetApAssetResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode', example='0'),
  errorMessage?: string(name='ErrorMessage', example='Success'),
  isSuccess?: boolean(name='IsSuccess', example='true'),
}

model GetApAssetResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApAssetResponseBody(name='body'),
}

async function getApAssetWithOptions(request: GetApAssetRequest, runtime: Util.RuntimeOptions): GetApAssetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApAsset',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApAsset(request: GetApAssetRequest): GetApAssetResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApAssetWithOptions(request, runtime);
}

model GetApDetailStatusRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  mac?: string(name='Mac'),
  needApgroupInfo?: boolean(name='NeedApgroupInfo'),
  needRadioStatus?: boolean(name='NeedRadioStatus'),
}

model GetApDetailStatusResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApDetailStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApDetailStatusResponseBody(name='body'),
}

async function getApDetailStatusWithOptions(request: GetApDetailStatusRequest, runtime: Util.RuntimeOptions): GetApDetailStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.needApgroupInfo)) {
    query['NeedApgroupInfo'] = request.needApgroupInfo;
  }
  if (!Util.isUnset(request.needRadioStatus)) {
    query['NeedRadioStatus'] = request.needRadioStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApDetailStatus',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApDetailStatus(request: GetApDetailStatusRequest): GetApDetailStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApDetailStatusWithOptions(request, runtime);
}

model GetApDetailedConfigRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApDetailedConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApDetailedConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApDetailedConfigResponseBody(name='body'),
}

async function getApDetailedConfigWithOptions(request: GetApDetailedConfigRequest, runtime: Util.RuntimeOptions): GetApDetailedConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApDetailedConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApDetailedConfig(request: GetApDetailedConfigRequest): GetApDetailedConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApDetailedConfigWithOptions(request, runtime);
}

model GetApInfoFromPoolRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApInfoFromPoolResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApInfoFromPoolResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApInfoFromPoolResponseBody(name='body'),
}

async function getApInfoFromPoolWithOptions(request: GetApInfoFromPoolRequest, runtime: Util.RuntimeOptions): GetApInfoFromPoolResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApInfoFromPool',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApInfoFromPool(request: GetApInfoFromPoolRequest): GetApInfoFromPoolResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApInfoFromPoolWithOptions(request, runtime);
}

model GetApRunHistoryTimeSerRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  end?: long(name='End'),
  start?: long(name='Start'),
}

model GetApRunHistoryTimeSerResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetApRunHistoryTimeSerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApRunHistoryTimeSerResponseBody(name='body'),
}

async function getApRunHistoryTimeSerWithOptions(request: GetApRunHistoryTimeSerRequest, runtime: Util.RuntimeOptions): GetApRunHistoryTimeSerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.end)) {
    query['End'] = request.end;
  }
  if (!Util.isUnset(request.start)) {
    query['Start'] = request.start;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApRunHistoryTimeSer',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApRunHistoryTimeSer(request: GetApRunHistoryTimeSerRequest): GetApRunHistoryTimeSerResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApRunHistoryTimeSerWithOptions(request, runtime);
}

model GetApStatusByGroupIdRequest {
  apgroupId?: string(name='ApgroupId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  cursor?: long(name='Cursor'),
  pageSize?: int32(name='PageSize'),
}

model GetApStatusByGroupIdResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApStatusByGroupIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApStatusByGroupIdResponseBody(name='body'),
}

async function getApStatusByGroupIdWithOptions(request: GetApStatusByGroupIdRequest, runtime: Util.RuntimeOptions): GetApStatusByGroupIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApStatusByGroupId',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApStatusByGroupId(request: GetApStatusByGroupIdRequest): GetApStatusByGroupIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApStatusByGroupIdWithOptions(request, runtime);
}

model GetApgroupConfigByIdentityRequest {
  apgroupId?: long(name='ApgroupId'),
  apgroupUuid?: string(name='ApgroupUuid'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApgroupConfigByIdentityResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetApgroupConfigByIdentityResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApgroupConfigByIdentityResponseBody(name='body'),
}

async function getApgroupConfigByIdentityWithOptions(request: GetApgroupConfigByIdentityRequest, runtime: Util.RuntimeOptions): GetApgroupConfigByIdentityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.apgroupUuid)) {
    query['ApgroupUuid'] = request.apgroupUuid;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApgroupConfigByIdentity',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApgroupConfigByIdentity(request: GetApgroupConfigByIdentityRequest): GetApgroupConfigByIdentityResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApgroupConfigByIdentityWithOptions(request, runtime);
}

model GetApgroupDetailedConfigRequest {
  apgroupId?: long(name='ApgroupId'),
  apgroupUuid?: string(name='ApgroupUuid'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApgroupDetailedConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetApgroupDetailedConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApgroupDetailedConfigResponseBody(name='body'),
}

async function getApgroupDetailedConfigWithOptions(request: GetApgroupDetailedConfigRequest, runtime: Util.RuntimeOptions): GetApgroupDetailedConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.apgroupUuid)) {
    query['ApgroupUuid'] = request.apgroupUuid;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApgroupDetailedConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApgroupDetailedConfig(request: GetApgroupDetailedConfigRequest): GetApgroupDetailedConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApgroupDetailedConfigWithOptions(request, runtime);
}

model GetApgroupIdRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApgroupIdResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApgroupIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApgroupIdResponseBody(name='body'),
}

async function getApgroupIdWithOptions(request: GetApgroupIdRequest, runtime: Util.RuntimeOptions): GetApgroupIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApgroupId',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApgroupId(request: GetApgroupIdRequest): GetApgroupIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApgroupIdWithOptions(request, runtime);
}

model GetApgroupSsidConfigRequest {
  apGroupUUId?: string(name='ApGroupUUId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model GetApgroupSsidConfigResponseBody = {
  data?: [  map[string]any ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetApgroupSsidConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetApgroupSsidConfigResponseBody(name='body'),
}

async function getApgroupSsidConfigWithOptions(request: GetApgroupSsidConfigRequest, runtime: Util.RuntimeOptions): GetApgroupSsidConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apGroupUUId)) {
    query['ApGroupUUId'] = request.apGroupUUId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApgroupSsidConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getApgroupSsidConfig(request: GetApgroupSsidConfigRequest): GetApgroupSsidConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApgroupSsidConfigWithOptions(request, runtime);
}

model GetBatchTaskProgressRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  taskId?: string(name='TaskId'),
}

model GetBatchTaskProgressResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetBatchTaskProgressResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetBatchTaskProgressResponseBody(name='body'),
}

async function getBatchTaskProgressWithOptions(request: GetBatchTaskProgressRequest, runtime: Util.RuntimeOptions): GetBatchTaskProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBatchTaskProgress',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getBatchTaskProgress(request: GetBatchTaskProgressRequest): GetBatchTaskProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBatchTaskProgressWithOptions(request, runtime);
}

model GetGroupMiscAggTimeSerRequest {
  apgroupUuid?: string(name='ApgroupUuid'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  end?: long(name='End'),
  start?: long(name='Start'),
}

model GetGroupMiscAggTimeSerResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetGroupMiscAggTimeSerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetGroupMiscAggTimeSerResponseBody(name='body'),
}

async function getGroupMiscAggTimeSerWithOptions(request: GetGroupMiscAggTimeSerRequest, runtime: Util.RuntimeOptions): GetGroupMiscAggTimeSerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupUuid)) {
    query['ApgroupUuid'] = request.apgroupUuid;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.end)) {
    query['End'] = request.end;
  }
  if (!Util.isUnset(request.start)) {
    query['Start'] = request.start;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetGroupMiscAggTimeSer',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getGroupMiscAggTimeSer(request: GetGroupMiscAggTimeSerRequest): GetGroupMiscAggTimeSerResponse {
  var runtime = new Util.RuntimeOptions{};
  return getGroupMiscAggTimeSerWithOptions(request, runtime);
}

model GetNetDeviceInfoRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  cursor?: long(name='Cursor'),
  hostName?: string(name='HostName'),
  id?: long(name='Id'),
  idc?: string(name='Idc'),
  logicNetPod?: string(name='LogicNetPod'),
  manufacturer?: string(name='Manufacturer'),
  mgnIp?: string(name='MgnIp'),
  model?: string(name='Model'),
  netPod?: string(name='NetPod'),
  pageSize?: int32(name='PageSize'),
  password?: string(name='Password'),
  requestId?: string(name='RequestId'),
  role?: string(name='Role'),
  serviceTag?: string(name='ServiceTag'),
  username?: string(name='Username'),
}

model GetNetDeviceInfoResponseBody = {
  data?: [  map[string]any ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetNetDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetNetDeviceInfoResponseBody(name='body'),
}

async function getNetDeviceInfoWithOptions(request: GetNetDeviceInfoRequest, runtime: Util.RuntimeOptions): GetNetDeviceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.hostName)) {
    query['HostName'] = request.hostName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.idc)) {
    query['Idc'] = request.idc;
  }
  if (!Util.isUnset(request.logicNetPod)) {
    query['LogicNetPod'] = request.logicNetPod;
  }
  if (!Util.isUnset(request.manufacturer)) {
    query['Manufacturer'] = request.manufacturer;
  }
  if (!Util.isUnset(request.mgnIp)) {
    query['MgnIp'] = request.mgnIp;
  }
  if (!Util.isUnset(request.model)) {
    query['Model'] = request.model;
  }
  if (!Util.isUnset(request.netPod)) {
    query['NetPod'] = request.netPod;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.role)) {
    query['Role'] = request.role;
  }
  if (!Util.isUnset(request.serviceTag)) {
    query['ServiceTag'] = request.serviceTag;
  }
  if (!Util.isUnset(request.username)) {
    query['Username'] = request.username;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetNetDeviceInfo',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getNetDeviceInfo(request: GetNetDeviceInfoRequest): GetNetDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNetDeviceInfoWithOptions(request, runtime);
}

model GetNetDeviceInfoWithSizeRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  cursor?: long(name='Cursor'),
  hostName?: string(name='HostName'),
  id?: long(name='Id'),
  idc?: string(name='Idc'),
  logicNetPod?: string(name='LogicNetPod'),
  manufacturer?: string(name='Manufacturer'),
  mgnIp?: string(name='MgnIp'),
  model?: string(name='Model'),
  netPod?: string(name='NetPod'),
  pageSize?: int32(name='PageSize'),
  password?: string(name='Password'),
  requestId?: string(name='RequestId'),
  role?: string(name='Role'),
  serviceTag?: string(name='ServiceTag'),
  username?: string(name='Username'),
}

model GetNetDeviceInfoWithSizeResponseBody = {
  data?: {
    count?: long(name='Count'),
    data?: [  map[string]any ](name='Data'),
  }(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetNetDeviceInfoWithSizeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetNetDeviceInfoWithSizeResponseBody(name='body'),
}

async function getNetDeviceInfoWithSizeWithOptions(request: GetNetDeviceInfoWithSizeRequest, runtime: Util.RuntimeOptions): GetNetDeviceInfoWithSizeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.hostName)) {
    query['HostName'] = request.hostName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.idc)) {
    query['Idc'] = request.idc;
  }
  if (!Util.isUnset(request.logicNetPod)) {
    query['LogicNetPod'] = request.logicNetPod;
  }
  if (!Util.isUnset(request.manufacturer)) {
    query['Manufacturer'] = request.manufacturer;
  }
  if (!Util.isUnset(request.mgnIp)) {
    query['MgnIp'] = request.mgnIp;
  }
  if (!Util.isUnset(request.model)) {
    query['Model'] = request.model;
  }
  if (!Util.isUnset(request.netPod)) {
    query['NetPod'] = request.netPod;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.role)) {
    query['Role'] = request.role;
  }
  if (!Util.isUnset(request.serviceTag)) {
    query['ServiceTag'] = request.serviceTag;
  }
  if (!Util.isUnset(request.username)) {
    query['Username'] = request.username;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetNetDeviceInfoWithSize',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getNetDeviceInfoWithSize(request: GetNetDeviceInfoWithSizeRequest): GetNetDeviceInfoWithSizeResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNetDeviceInfoWithSizeWithOptions(request, runtime);
}

model GetPageVisitDataRequest {
  appCode?: string(name='AppCode', description='appCode', example='3c0837d5-e65b-11ec-9985-02420bb080c6'),
  appName?: string(name='AppName', description='appName', example='CLOUD_NETWORK'),
  endTime?: string(name='EndTime', description='endTime', example='2023-07-11'),
  PId?: string(name='PId', description='pId', example='19048'),
  startTime?: string(name='StartTime', description='startTime', example='2022-11-22'),
}

model GetPageVisitDataResponseBody = {
  data?: map[string]any(name='Data', example='{
      "totalPv": 535,
      "totalUv": 246,
      "detailVo": [
{
"uv":17,
"pv":56,
"ds":"20230710"
}
]
}'),
  errorCode?: int32(name='ErrorCode', example='111'),
  errorMessage?: string(name='ErrorMessage', example='the status of ap is not online'),
  isSuccess?: boolean(name='IsSuccess', example='true'),
  requestId?: string(name='RequestId', example='76F569F1-078E-5A08-881D-810B97C502A5'),
}

model GetPageVisitDataResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPageVisitDataResponseBody(name='body'),
}

async function getPageVisitDataWithOptions(request: GetPageVisitDataRequest, runtime: Util.RuntimeOptions): GetPageVisitDataResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetPageVisitData',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPageVisitData(request: GetPageVisitDataRequest): GetPageVisitDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPageVisitDataWithOptions(request, runtime);
}

model GetRadioRunHistoryTimeSerRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  end?: long(name='End'),
  start?: long(name='Start'),
}

model GetRadioRunHistoryTimeSerResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetRadioRunHistoryTimeSerResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetRadioRunHistoryTimeSerResponseBody(name='body'),
}

async function getRadioRunHistoryTimeSerWithOptions(request: GetRadioRunHistoryTimeSerRequest, runtime: Util.RuntimeOptions): GetRadioRunHistoryTimeSerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.end)) {
    query['End'] = request.end;
  }
  if (!Util.isUnset(request.start)) {
    query['Start'] = request.start;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetRadioRunHistoryTimeSer',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRadioRunHistoryTimeSer(request: GetRadioRunHistoryTimeSerRequest): GetRadioRunHistoryTimeSerResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRadioRunHistoryTimeSerWithOptions(request, runtime);
}

model GetStaDetailedStatusByMacRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  staMac?: string(name='StaMac'),
}

model GetStaDetailedStatusByMacResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model GetStaDetailedStatusByMacResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetStaDetailedStatusByMacResponseBody(name='body'),
}

async function getStaDetailedStatusByMacWithOptions(request: GetStaDetailedStatusByMacRequest, runtime: Util.RuntimeOptions): GetStaDetailedStatusByMacResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.staMac)) {
    query['StaMac'] = request.staMac;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetStaDetailedStatusByMac',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getStaDetailedStatusByMac(request: GetStaDetailedStatusByMacRequest): GetStaDetailedStatusByMacResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStaDetailedStatusByMacWithOptions(request, runtime);
}

model GetStaStatusListByApRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  cursor?: long(name='Cursor'),
  pageSize?: int32(name='PageSize'),
}

model GetStaStatusListByApResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model GetStaStatusListByApResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetStaStatusListByApResponseBody(name='body'),
}

async function getStaStatusListByApWithOptions(request: GetStaStatusListByApRequest, runtime: Util.RuntimeOptions): GetStaStatusListByApResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetStaStatusListByAp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getStaStatusListByAp(request: GetStaStatusListByApRequest): GetStaStatusListByApResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStaStatusListByApWithOptions(request, runtime);
}

model JudgeXingTianBusinessRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  realmId?: string(name='RealmId'),
}

model JudgeXingTianBusinessResponseBody = {
  data?: boolean(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model JudgeXingTianBusinessResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: JudgeXingTianBusinessResponseBody(name='body'),
}

async function judgeXingTianBusinessWithOptions(request: JudgeXingTianBusinessRequest, runtime: Util.RuntimeOptions): JudgeXingTianBusinessResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.realmId)) {
    query['RealmId'] = request.realmId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'JudgeXingTianBusiness',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function judgeXingTianBusiness(request: JudgeXingTianBusinessRequest): JudgeXingTianBusinessResponse {
  var runtime = new Util.RuntimeOptions{};
  return judgeXingTianBusinessWithOptions(request, runtime);
}

model KickStaRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  staMac?: string(name='StaMac'),
}

model KickStaResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model KickStaResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: KickStaResponseBody(name='body'),
}

async function kickStaWithOptions(request: KickStaRequest, runtime: Util.RuntimeOptions): KickStaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.staMac)) {
    query['StaMac'] = request.staMac;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'KickSta',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function kickSta(request: KickStaRequest): KickStaResponse {
  var runtime = new Util.RuntimeOptions{};
  return kickStaWithOptions(request, runtime);
}

model ListApgroupDescendantRequest {
  apgroupId?: long(name='ApgroupId'),
  apgroupUuid?: string(name='ApgroupUuid'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  cursor?: long(name='Cursor'),
  level?: long(name='Level'),
  pageSize?: int32(name='PageSize'),
}

model ListApgroupDescendantResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model ListApgroupDescendantResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListApgroupDescendantResponseBody(name='body'),
}

async function listApgroupDescendantWithOptions(request: ListApgroupDescendantRequest, runtime: Util.RuntimeOptions): ListApgroupDescendantResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.apgroupUuid)) {
    query['ApgroupUuid'] = request.apgroupUuid;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.level)) {
    query['Level'] = request.level;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApgroupDescendant',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listApgroupDescendant(request: ListApgroupDescendantRequest): ListApgroupDescendantResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApgroupDescendantWithOptions(request, runtime);
}

model ListJobOrdersRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  changingType?: string(name='ChangingType'),
  clientSystem?: string(name='ClientSystem'),
  clientUniqueId?: string(name='ClientUniqueId'),
  cursor?: long(name='Cursor'),
  endTime?: string(name='EndTime'),
  handler?: string(name='Handler'),
  id?: string(name='Id'),
  orderStatus?: string(name='OrderStatus'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  status?: string(name='Status'),
  title?: string(name='Title'),
}

model ListJobOrdersResponseBody = {
  data?: [  map[string]any ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model ListJobOrdersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListJobOrdersResponseBody(name='body'),
}

async function listJobOrdersWithOptions(request: ListJobOrdersRequest, runtime: Util.RuntimeOptions): ListJobOrdersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.changingType)) {
    query['ChangingType'] = request.changingType;
  }
  if (!Util.isUnset(request.clientSystem)) {
    query['ClientSystem'] = request.clientSystem;
  }
  if (!Util.isUnset(request.clientUniqueId)) {
    query['ClientUniqueId'] = request.clientUniqueId;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.handler)) {
    query['Handler'] = request.handler;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.orderStatus)) {
    query['OrderStatus'] = request.orderStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobOrders',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listJobOrders(request: ListJobOrdersRequest): ListJobOrdersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobOrdersWithOptions(request, runtime);
}

model ListJobOrdersWithSizeRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  changingType?: string(name='ChangingType'),
  clientSystem?: string(name='ClientSystem'),
  clientUniqueId?: string(name='ClientUniqueId'),
  cursor?: long(name='Cursor'),
  endTime?: string(name='EndTime'),
  handler?: string(name='Handler'),
  id?: string(name='Id'),
  orderStatus?: string(name='OrderStatus'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  startTime?: string(name='StartTime'),
  status?: string(name='Status'),
  title?: string(name='Title'),
}

model ListJobOrdersWithSizeResponseBody = {
  data?: {
    count?: long(name='Count'),
    data?: [  map[string]any ](name='Data'),
  }(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model ListJobOrdersWithSizeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListJobOrdersWithSizeResponseBody(name='body'),
}

async function listJobOrdersWithSizeWithOptions(request: ListJobOrdersWithSizeRequest, runtime: Util.RuntimeOptions): ListJobOrdersWithSizeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.changingType)) {
    query['ChangingType'] = request.changingType;
  }
  if (!Util.isUnset(request.clientSystem)) {
    query['ClientSystem'] = request.clientSystem;
  }
  if (!Util.isUnset(request.clientUniqueId)) {
    query['ClientUniqueId'] = request.clientUniqueId;
  }
  if (!Util.isUnset(request.cursor)) {
    query['Cursor'] = request.cursor;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.handler)) {
    query['Handler'] = request.handler;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.orderStatus)) {
    query['OrderStatus'] = request.orderStatus;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListJobOrdersWithSize',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listJobOrdersWithSize(request: ListJobOrdersWithSizeRequest): ListJobOrdersWithSizeResponse {
  var runtime = new Util.RuntimeOptions{};
  return listJobOrdersWithSizeWithOptions(request, runtime);
}

model NewApgroupConfigRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  name?: string(name='Name'),
  parentApgroupId?: string(name='ParentApgroupId'),
}

model NewApgroupConfigResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model NewApgroupConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: NewApgroupConfigResponseBody(name='body'),
}

async function newApgroupConfigWithOptions(request: NewApgroupConfigRequest, runtime: Util.RuntimeOptions): NewApgroupConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.parentApgroupId)) {
    query['ParentApgroupId'] = request.parentApgroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'NewApgroupConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function newApgroupConfig(request: NewApgroupConfigRequest): NewApgroupConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return newApgroupConfigWithOptions(request, runtime);
}

model NewJobOrderRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  callbackUrl?: string(name='CallbackUrl'),
  changeType?: string(name='ChangeType'),
  clientSystem?: string(name='ClientSystem'),
  clientUniqueId?: string(name='ClientUniqueId'),
  creator?: string(name='Creator'),
  params?: map[string]any(name='Params'),
  referUrl?: string(name='ReferUrl'),
  requestId?: string(name='RequestId'),
  title?: string(name='Title'),
}

model NewJobOrderShrinkRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  callbackUrl?: string(name='CallbackUrl'),
  changeType?: string(name='ChangeType'),
  clientSystem?: string(name='ClientSystem'),
  clientUniqueId?: string(name='ClientUniqueId'),
  creator?: string(name='Creator'),
  paramsShrink?: string(name='Params'),
  referUrl?: string(name='ReferUrl'),
  requestId?: string(name='RequestId'),
  title?: string(name='Title'),
}

model NewJobOrderResponseBody = {
  data?: {
    orderId?: long(name='OrderId'),
  }(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model NewJobOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: NewJobOrderResponseBody(name='body'),
}

async function newJobOrderWithOptions(tmpReq: NewJobOrderRequest, runtime: Util.RuntimeOptions): NewJobOrderResponse {
  Util.validateModel(tmpReq);
  var request = new NewJobOrderShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.params)) {
    request.paramsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.params, 'Params', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.callbackUrl)) {
    query['CallbackUrl'] = request.callbackUrl;
  }
  if (!Util.isUnset(request.changeType)) {
    query['ChangeType'] = request.changeType;
  }
  if (!Util.isUnset(request.clientSystem)) {
    query['ClientSystem'] = request.clientSystem;
  }
  if (!Util.isUnset(request.clientUniqueId)) {
    query['ClientUniqueId'] = request.clientUniqueId;
  }
  if (!Util.isUnset(request.creator)) {
    query['Creator'] = request.creator;
  }
  if (!Util.isUnset(request.referUrl)) {
    query['ReferUrl'] = request.referUrl;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  if (!Util.isUnset(request.title)) {
    query['Title'] = request.title;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.paramsShrink)) {
    body['Params'] = request.paramsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'NewJobOrder',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function newJobOrder(request: NewJobOrderRequest): NewJobOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return newJobOrderWithOptions(request, runtime);
}

model NewNetDeviceInfoRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  devices?: [ 
    {
      hostName?: string(name='HostName'),
      idc?: string(name='Idc'),
      logicNetPod?: string(name='LogicNetPod'),
      manufacturer?: string(name='Manufacturer'),
      mgnIp?: string(name='MgnIp'),
      model?: string(name='Model'),
      netPod?: string(name='NetPod'),
      password?: string(name='Password'),
      role?: string(name='Role'),
      serviceTag?: string(name='ServiceTag'),
      username?: string(name='Username'),
    }
  ](name='Devices'),
  requestId?: string(name='RequestId'),
}

model NewNetDeviceInfoResponseBody = {
  data?: [ long ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model NewNetDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: NewNetDeviceInfoResponseBody(name='body'),
}

async function newNetDeviceInfoWithOptions(request: NewNetDeviceInfoRequest, runtime: Util.RuntimeOptions): NewNetDeviceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.devices)) {
    body['Devices'] = request.devices;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'NewNetDeviceInfo',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function newNetDeviceInfo(request: NewNetDeviceInfoRequest): NewNetDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return newNetDeviceInfoWithOptions(request, runtime);
}

model PutAppConfigAndSaveRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  configureType?: string(name='ConfigureType'),
  currentTime?: long(name='CurrentTime'),
  data?: string(name='Data'),
}

model PutAppConfigAndSaveResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model PutAppConfigAndSaveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PutAppConfigAndSaveResponseBody(name='body'),
}

async function putAppConfigAndSaveWithOptions(request: PutAppConfigAndSaveRequest, runtime: Util.RuntimeOptions): PutAppConfigAndSaveResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.configureType)) {
    query['ConfigureType'] = request.configureType;
  }
  if (!Util.isUnset(request.currentTime)) {
    query['CurrentTime'] = request.currentTime;
  }
  if (!Util.isUnset(request.data)) {
    query['Data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PutAppConfigAndSave',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function putAppConfigAndSave(request: PutAppConfigAndSaveRequest): PutAppConfigAndSaveResponse {
  var runtime = new Util.RuntimeOptions{};
  return putAppConfigAndSaveWithOptions(request, runtime);
}

model QueryJobOrderRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  orderId?: long(name='OrderId'),
  requestId?: string(name='RequestId'),
}

model QueryJobOrderResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model QueryJobOrderResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: QueryJobOrderResponseBody(name='body'),
}

async function queryJobOrderWithOptions(request: QueryJobOrderRequest, runtime: Util.RuntimeOptions): QueryJobOrderResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.orderId)) {
    query['OrderId'] = request.orderId;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryJobOrder',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function queryJobOrder(request: QueryJobOrderRequest): QueryJobOrderResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryJobOrderWithOptions(request, runtime);
}

model RebootApRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
}

model RebootApResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model RebootApResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RebootApResponseBody(name='body'),
}

async function rebootApWithOptions(request: RebootApRequest, runtime: Util.RuntimeOptions): RebootApResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RebootAp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function rebootAp(request: RebootApRequest): RebootApResponse {
  var runtime = new Util.RuntimeOptions{};
  return rebootApWithOptions(request, runtime);
}

model RegisterApAssetRequest {
  apGroupUUId?: string(name='ApGroupUUId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  id?: long(name='Id'),
  mac?: string(name='Mac'),
  serialNo?: string(name='SerialNo'),
}

model RegisterApAssetResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model RegisterApAssetResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RegisterApAssetResponseBody(name='body'),
}

async function registerApAssetWithOptions(request: RegisterApAssetRequest, runtime: Util.RuntimeOptions): RegisterApAssetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apGroupUUId)) {
    query['ApGroupUUId'] = request.apGroupUUId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.serialNo)) {
    query['SerialNo'] = request.serialNo;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RegisterApAsset',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function registerApAsset(request: RegisterApAssetRequest): RegisterApAssetResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerApAssetWithOptions(request, runtime);
}

model RepairApRadioRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  radioIndex?: string(name='RadioIndex'),
}

model RepairApRadioResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: boolean(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model RepairApRadioResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RepairApRadioResponseBody(name='body'),
}

async function repairApRadioWithOptions(request: RepairApRadioRequest, runtime: Util.RuntimeOptions): RepairApRadioResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.radioIndex)) {
    query['RadioIndex'] = request.radioIndex;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RepairApRadio',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function repairApRadio(request: RepairApRadioRequest): RepairApRadioResponse {
  var runtime = new Util.RuntimeOptions{};
  return repairApRadioWithOptions(request, runtime);
}

model SaveApBasicConfigRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  country?: string(name='Country'),
  dai?: string(name='Dai'),
  description?: string(name='Description'),
  echoInt?: int32(name='EchoInt'),
  failover?: int32(name='Failover'),
  id?: long(name='Id'),
  insecureAllowed?: int32(name='InsecureAllowed'),
  lanIp?: string(name='LanIp'),
  lanMask?: string(name='LanMask'),
  lanStatus?: int32(name='LanStatus'),
  logIp?: string(name='LogIp'),
  logLevel?: int32(name='LogLevel'),
  name?: string(name='Name'),
  passwd?: string(name='Passwd'),
  protocol?: string(name='Protocol'),
  route?: string(name='Route'),
  scan?: int32(name='Scan'),
  tokenServer?: string(name='TokenServer'),
  vpn?: string(name='Vpn'),
  workMode?: int32(name='WorkMode'),
}

model SaveApBasicConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApBasicConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApBasicConfigResponseBody(name='body'),
}

async function saveApBasicConfigWithOptions(request: SaveApBasicConfigRequest, runtime: Util.RuntimeOptions): SaveApBasicConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.country)) {
    query['Country'] = request.country;
  }
  if (!Util.isUnset(request.dai)) {
    query['Dai'] = request.dai;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.echoInt)) {
    query['EchoInt'] = request.echoInt;
  }
  if (!Util.isUnset(request.failover)) {
    query['Failover'] = request.failover;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.insecureAllowed)) {
    query['InsecureAllowed'] = request.insecureAllowed;
  }
  if (!Util.isUnset(request.lanIp)) {
    query['LanIp'] = request.lanIp;
  }
  if (!Util.isUnset(request.lanMask)) {
    query['LanMask'] = request.lanMask;
  }
  if (!Util.isUnset(request.lanStatus)) {
    query['LanStatus'] = request.lanStatus;
  }
  if (!Util.isUnset(request.logIp)) {
    query['LogIp'] = request.logIp;
  }
  if (!Util.isUnset(request.logLevel)) {
    query['LogLevel'] = request.logLevel;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.passwd)) {
    query['Passwd'] = request.passwd;
  }
  if (!Util.isUnset(request.protocol)) {
    query['Protocol'] = request.protocol;
  }
  if (!Util.isUnset(request.route)) {
    query['Route'] = request.route;
  }
  if (!Util.isUnset(request.scan)) {
    query['Scan'] = request.scan;
  }
  if (!Util.isUnset(request.tokenServer)) {
    query['TokenServer'] = request.tokenServer;
  }
  if (!Util.isUnset(request.vpn)) {
    query['Vpn'] = request.vpn;
  }
  if (!Util.isUnset(request.workMode)) {
    query['WorkMode'] = request.workMode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApBasicConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApBasicConfig(request: SaveApBasicConfigRequest): SaveApBasicConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApBasicConfigWithOptions(request, runtime);
}

model SaveApPortalConfigRequest {
  apConfigId?: long(name='ApConfigId'),
  appAuthUrl?: string(name='AppAuthUrl'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  authKey?: string(name='AuthKey'),
  authSecret?: string(name='AuthSecret'),
  checkUrl?: string(name='CheckUrl'),
  clientDownload?: int32(name='ClientDownload'),
  clientUpload?: int32(name='ClientUpload'),
  countdown?: int32(name='Countdown'),
  network?: int32(name='Network'),
  portalTypes?: [ string ](name='PortalTypes'),
  portalUrl?: string(name='PortalUrl'),
  timeStamp?: long(name='TimeStamp'),
  totalDownload?: int32(name='TotalDownload'),
  totalUpload?: int32(name='TotalUpload'),
  webAuthUrl?: string(name='WebAuthUrl'),
  whitelist?: string(name='Whitelist'),
}

model SaveApPortalConfigShrinkRequest {
  apConfigId?: long(name='ApConfigId'),
  appAuthUrl?: string(name='AppAuthUrl'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  authKey?: string(name='AuthKey'),
  authSecret?: string(name='AuthSecret'),
  checkUrl?: string(name='CheckUrl'),
  clientDownload?: int32(name='ClientDownload'),
  clientUpload?: int32(name='ClientUpload'),
  countdown?: int32(name='Countdown'),
  network?: int32(name='Network'),
  portalTypesShrink?: string(name='PortalTypes'),
  portalUrl?: string(name='PortalUrl'),
  timeStamp?: long(name='TimeStamp'),
  totalDownload?: int32(name='TotalDownload'),
  totalUpload?: int32(name='TotalUpload'),
  webAuthUrl?: string(name='WebAuthUrl'),
  whitelist?: string(name='Whitelist'),
}

model SaveApPortalConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApPortalConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApPortalConfigResponseBody(name='body'),
}

async function saveApPortalConfigWithOptions(tmpReq: SaveApPortalConfigRequest, runtime: Util.RuntimeOptions): SaveApPortalConfigResponse {
  Util.validateModel(tmpReq);
  var request = new SaveApPortalConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.portalTypes)) {
    request.portalTypesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.portalTypes, 'PortalTypes', 'simple');
  }
  var query = {};
  if (!Util.isUnset(request.apConfigId)) {
    query['ApConfigId'] = request.apConfigId;
  }
  if (!Util.isUnset(request.appAuthUrl)) {
    query['AppAuthUrl'] = request.appAuthUrl;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.authKey)) {
    query['AuthKey'] = request.authKey;
  }
  if (!Util.isUnset(request.authSecret)) {
    query['AuthSecret'] = request.authSecret;
  }
  if (!Util.isUnset(request.checkUrl)) {
    query['CheckUrl'] = request.checkUrl;
  }
  if (!Util.isUnset(request.clientDownload)) {
    query['ClientDownload'] = request.clientDownload;
  }
  if (!Util.isUnset(request.clientUpload)) {
    query['ClientUpload'] = request.clientUpload;
  }
  if (!Util.isUnset(request.countdown)) {
    query['Countdown'] = request.countdown;
  }
  if (!Util.isUnset(request.network)) {
    query['Network'] = request.network;
  }
  if (!Util.isUnset(request.portalTypesShrink)) {
    query['PortalTypes'] = request.portalTypesShrink;
  }
  if (!Util.isUnset(request.portalUrl)) {
    query['PortalUrl'] = request.portalUrl;
  }
  if (!Util.isUnset(request.timeStamp)) {
    query['TimeStamp'] = request.timeStamp;
  }
  if (!Util.isUnset(request.totalDownload)) {
    query['TotalDownload'] = request.totalDownload;
  }
  if (!Util.isUnset(request.totalUpload)) {
    query['TotalUpload'] = request.totalUpload;
  }
  if (!Util.isUnset(request.webAuthUrl)) {
    query['WebAuthUrl'] = request.webAuthUrl;
  }
  if (!Util.isUnset(request.whitelist)) {
    query['Whitelist'] = request.whitelist;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApPortalConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApPortalConfig(request: SaveApPortalConfigRequest): SaveApPortalConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApPortalConfigWithOptions(request, runtime);
}

model SaveApRadioConfigRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  bcastRate?: int32(name='BcastRate'),
  beaconInt?: int32(name='BeaconInt'),
  channel?: string(name='Channel'),
  disabled?: string(name='Disabled'),
  frag?: int32(name='Frag'),
  htmode?: string(name='Htmode'),
  hwmode?: string(name='Hwmode'),
  id?: long(name='Id'),
  mcastRate?: int32(name='McastRate'),
  mgmtRate?: int32(name='MgmtRate'),
  minrate?: int32(name='Minrate'),
  noscan?: string(name='Noscan'),
  probereq?: string(name='Probereq'),
  requireMode?: string(name='RequireMode'),
  rts?: int32(name='Rts'),
  shortgi?: string(name='Shortgi'),
  txpower?: string(name='Txpower'),
  uapsd?: int32(name='Uapsd'),
}

model SaveApRadioConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApRadioConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApRadioConfigResponseBody(name='body'),
}

async function saveApRadioConfigWithOptions(request: SaveApRadioConfigRequest, runtime: Util.RuntimeOptions): SaveApRadioConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.bcastRate)) {
    query['BcastRate'] = request.bcastRate;
  }
  if (!Util.isUnset(request.beaconInt)) {
    query['BeaconInt'] = request.beaconInt;
  }
  if (!Util.isUnset(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!Util.isUnset(request.disabled)) {
    query['Disabled'] = request.disabled;
  }
  if (!Util.isUnset(request.frag)) {
    query['Frag'] = request.frag;
  }
  if (!Util.isUnset(request.htmode)) {
    query['Htmode'] = request.htmode;
  }
  if (!Util.isUnset(request.hwmode)) {
    query['Hwmode'] = request.hwmode;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mcastRate)) {
    query['McastRate'] = request.mcastRate;
  }
  if (!Util.isUnset(request.mgmtRate)) {
    query['MgmtRate'] = request.mgmtRate;
  }
  if (!Util.isUnset(request.minrate)) {
    query['Minrate'] = request.minrate;
  }
  if (!Util.isUnset(request.noscan)) {
    query['Noscan'] = request.noscan;
  }
  if (!Util.isUnset(request.probereq)) {
    query['Probereq'] = request.probereq;
  }
  if (!Util.isUnset(request.requireMode)) {
    query['RequireMode'] = request.requireMode;
  }
  if (!Util.isUnset(request.rts)) {
    query['Rts'] = request.rts;
  }
  if (!Util.isUnset(request.shortgi)) {
    query['Shortgi'] = request.shortgi;
  }
  if (!Util.isUnset(request.txpower)) {
    query['Txpower'] = request.txpower;
  }
  if (!Util.isUnset(request.uapsd)) {
    query['Uapsd'] = request.uapsd;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApRadioConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApRadioConfig(request: SaveApRadioConfigRequest): SaveApRadioConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApRadioConfigWithOptions(request, runtime);
}

model SaveApSsidConfigRequest {
  acctPort?: int32(name='AcctPort'),
  acctSecret?: string(name='AcctSecret'),
  acctServer?: string(name='AcctServer'),
  acctStatusServerWork?: int32(name='AcctStatusServerWork'),
  apAssetId?: long(name='ApAssetId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  arpProxyEnable?: int32(name='ArpProxyEnable'),
  authCache?: string(name='AuthCache'),
  authPort?: int32(name='AuthPort'),
  authSecret?: string(name='AuthSecret'),
  authServer?: string(name='AuthServer'),
  authStatusServerWork?: int32(name='AuthStatusServerWork'),
  cir?: long(name='Cir'),
  cirStep?: long(name='CirStep'),
  cirType?: int32(name='CirType'),
  cirUl?: long(name='CirUl'),
  daeClient?: string(name='DaeClient'),
  daePort?: int32(name='DaePort'),
  daeSecret?: string(name='DaeSecret'),
  disabled?: string(name='Disabled'),
  disassocLowAck?: string(name='DisassocLowAck'),
  disassocWeakRssi?: int32(name='DisassocWeakRssi'),
  dynamicVlan?: int32(name='DynamicVlan'),
  encKey?: string(name='EncKey'),
  encryption?: string(name='Encryption'),
  fourthAuthPort?: int32(name='FourthAuthPort'),
  fourthAuthSecret?: string(name='FourthAuthSecret'),
  fourthAuthServer?: string(name='FourthAuthServer'),
  ftOverDs?: int32(name='FtOverDs'),
  hidden?: string(name='Hidden'),
  id?: long(name='Id'),
  ieee80211r?: int32(name='Ieee80211r'),
  ieee80211w?: string(name='Ieee80211w'),
  ignoreWeakProbe?: int32(name='IgnoreWeakProbe'),
  isolate?: string(name='Isolate'),
  liteEffect?: boolean(name='LiteEffect'),
  mac?: string(name='Mac'),
  maxInactivity?: int32(name='MaxInactivity'),
  maxassoc?: int32(name='Maxassoc'),
  mobilityDomain?: string(name='MobilityDomain'),
  multicastForward?: int32(name='MulticastForward'),
  nasid?: string(name='Nasid'),
  ndProxyWork?: int32(name='NdProxyWork'),
  network?: int32(name='Network'),
  ownip?: string(name='Ownip'),
  radioIndex?: string(name='RadioIndex'),
  secondaryAcctPort?: int32(name='SecondaryAcctPort'),
  secondaryAcctSecret?: string(name='SecondaryAcctSecret'),
  secondaryAcctServer?: string(name='SecondaryAcctServer'),
  secondaryAuthPort?: int32(name='SecondaryAuthPort'),
  secondaryAuthSecret?: string(name='SecondaryAuthSecret'),
  secondaryAuthServer?: string(name='SecondaryAuthServer'),
  sendConfigToAp?: boolean(name='SendConfigToAp'),
  shortPreamble?: string(name='ShortPreamble'),
  ssid?: string(name='Ssid'),
  ssidLb?: int32(name='SsidLb'),
  thirdAuthPort?: int32(name='ThirdAuthPort'),
  thirdAuthSecret?: string(name='ThirdAuthSecret'),
  thirdAuthServer?: string(name='ThirdAuthServer'),
  type?: int32(name='Type'),
  vlanDhcp?: int32(name='VlanDhcp'),
  wmm?: string(name='Wmm'),
}

model SaveApSsidConfigResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model SaveApSsidConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApSsidConfigResponseBody(name='body'),
}

async function saveApSsidConfigWithOptions(request: SaveApSsidConfigRequest, runtime: Util.RuntimeOptions): SaveApSsidConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.acctPort)) {
    query['AcctPort'] = request.acctPort;
  }
  if (!Util.isUnset(request.acctSecret)) {
    query['AcctSecret'] = request.acctSecret;
  }
  if (!Util.isUnset(request.acctServer)) {
    query['AcctServer'] = request.acctServer;
  }
  if (!Util.isUnset(request.acctStatusServerWork)) {
    query['AcctStatusServerWork'] = request.acctStatusServerWork;
  }
  if (!Util.isUnset(request.apAssetId)) {
    query['ApAssetId'] = request.apAssetId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.arpProxyEnable)) {
    query['ArpProxyEnable'] = request.arpProxyEnable;
  }
  if (!Util.isUnset(request.authCache)) {
    query['AuthCache'] = request.authCache;
  }
  if (!Util.isUnset(request.authPort)) {
    query['AuthPort'] = request.authPort;
  }
  if (!Util.isUnset(request.authSecret)) {
    query['AuthSecret'] = request.authSecret;
  }
  if (!Util.isUnset(request.authServer)) {
    query['AuthServer'] = request.authServer;
  }
  if (!Util.isUnset(request.authStatusServerWork)) {
    query['AuthStatusServerWork'] = request.authStatusServerWork;
  }
  if (!Util.isUnset(request.cir)) {
    query['Cir'] = request.cir;
  }
  if (!Util.isUnset(request.cirStep)) {
    query['CirStep'] = request.cirStep;
  }
  if (!Util.isUnset(request.cirType)) {
    query['CirType'] = request.cirType;
  }
  if (!Util.isUnset(request.cirUl)) {
    query['CirUl'] = request.cirUl;
  }
  if (!Util.isUnset(request.daeClient)) {
    query['DaeClient'] = request.daeClient;
  }
  if (!Util.isUnset(request.daePort)) {
    query['DaePort'] = request.daePort;
  }
  if (!Util.isUnset(request.daeSecret)) {
    query['DaeSecret'] = request.daeSecret;
  }
  if (!Util.isUnset(request.disabled)) {
    query['Disabled'] = request.disabled;
  }
  if (!Util.isUnset(request.disassocLowAck)) {
    query['DisassocLowAck'] = request.disassocLowAck;
  }
  if (!Util.isUnset(request.disassocWeakRssi)) {
    query['DisassocWeakRssi'] = request.disassocWeakRssi;
  }
  if (!Util.isUnset(request.dynamicVlan)) {
    query['DynamicVlan'] = request.dynamicVlan;
  }
  if (!Util.isUnset(request.encKey)) {
    query['EncKey'] = request.encKey;
  }
  if (!Util.isUnset(request.encryption)) {
    query['Encryption'] = request.encryption;
  }
  if (!Util.isUnset(request.fourthAuthPort)) {
    query['FourthAuthPort'] = request.fourthAuthPort;
  }
  if (!Util.isUnset(request.fourthAuthSecret)) {
    query['FourthAuthSecret'] = request.fourthAuthSecret;
  }
  if (!Util.isUnset(request.fourthAuthServer)) {
    query['FourthAuthServer'] = request.fourthAuthServer;
  }
  if (!Util.isUnset(request.ftOverDs)) {
    query['FtOverDs'] = request.ftOverDs;
  }
  if (!Util.isUnset(request.hidden)) {
    query['Hidden'] = request.hidden;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.ieee80211r)) {
    query['Ieee80211r'] = request.ieee80211r;
  }
  if (!Util.isUnset(request.ieee80211w)) {
    query['Ieee80211w'] = request.ieee80211w;
  }
  if (!Util.isUnset(request.ignoreWeakProbe)) {
    query['IgnoreWeakProbe'] = request.ignoreWeakProbe;
  }
  if (!Util.isUnset(request.isolate)) {
    query['Isolate'] = request.isolate;
  }
  if (!Util.isUnset(request.liteEffect)) {
    query['LiteEffect'] = request.liteEffect;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.maxInactivity)) {
    query['MaxInactivity'] = request.maxInactivity;
  }
  if (!Util.isUnset(request.maxassoc)) {
    query['Maxassoc'] = request.maxassoc;
  }
  if (!Util.isUnset(request.mobilityDomain)) {
    query['MobilityDomain'] = request.mobilityDomain;
  }
  if (!Util.isUnset(request.multicastForward)) {
    query['MulticastForward'] = request.multicastForward;
  }
  if (!Util.isUnset(request.nasid)) {
    query['Nasid'] = request.nasid;
  }
  if (!Util.isUnset(request.ndProxyWork)) {
    query['NdProxyWork'] = request.ndProxyWork;
  }
  if (!Util.isUnset(request.network)) {
    query['Network'] = request.network;
  }
  if (!Util.isUnset(request.ownip)) {
    query['Ownip'] = request.ownip;
  }
  if (!Util.isUnset(request.radioIndex)) {
    query['RadioIndex'] = request.radioIndex;
  }
  if (!Util.isUnset(request.secondaryAcctPort)) {
    query['SecondaryAcctPort'] = request.secondaryAcctPort;
  }
  if (!Util.isUnset(request.secondaryAcctSecret)) {
    query['SecondaryAcctSecret'] = request.secondaryAcctSecret;
  }
  if (!Util.isUnset(request.secondaryAcctServer)) {
    query['SecondaryAcctServer'] = request.secondaryAcctServer;
  }
  if (!Util.isUnset(request.secondaryAuthPort)) {
    query['SecondaryAuthPort'] = request.secondaryAuthPort;
  }
  if (!Util.isUnset(request.secondaryAuthSecret)) {
    query['SecondaryAuthSecret'] = request.secondaryAuthSecret;
  }
  if (!Util.isUnset(request.secondaryAuthServer)) {
    query['SecondaryAuthServer'] = request.secondaryAuthServer;
  }
  if (!Util.isUnset(request.sendConfigToAp)) {
    query['SendConfigToAp'] = request.sendConfigToAp;
  }
  if (!Util.isUnset(request.shortPreamble)) {
    query['ShortPreamble'] = request.shortPreamble;
  }
  if (!Util.isUnset(request.ssid)) {
    query['Ssid'] = request.ssid;
  }
  if (!Util.isUnset(request.ssidLb)) {
    query['SsidLb'] = request.ssidLb;
  }
  if (!Util.isUnset(request.thirdAuthPort)) {
    query['ThirdAuthPort'] = request.thirdAuthPort;
  }
  if (!Util.isUnset(request.thirdAuthSecret)) {
    query['ThirdAuthSecret'] = request.thirdAuthSecret;
  }
  if (!Util.isUnset(request.thirdAuthServer)) {
    query['ThirdAuthServer'] = request.thirdAuthServer;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.vlanDhcp)) {
    query['VlanDhcp'] = request.vlanDhcp;
  }
  if (!Util.isUnset(request.wmm)) {
    query['Wmm'] = request.wmm;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApSsidConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApSsidConfig(request: SaveApSsidConfigRequest): SaveApSsidConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApSsidConfigWithOptions(request, runtime);
}

model SaveApThirdAppRequest {
  addStyle?: int32(name='AddStyle'),
  apAssetId?: long(name='ApAssetId'),
  appCode?: string(name='AppCode'),
  appData?: string(name='AppData'),
  appName?: string(name='AppName'),
  category?: int32(name='Category'),
  id?: long(name='Id'),
  mac?: string(name='Mac'),
  thirdAppName?: string(name='ThirdAppName'),
  version?: string(name='Version'),
}

model SaveApThirdAppResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApThirdAppResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApThirdAppResponseBody(name='body'),
}

async function saveApThirdAppWithOptions(request: SaveApThirdAppRequest, runtime: Util.RuntimeOptions): SaveApThirdAppResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.addStyle)) {
    query['AddStyle'] = request.addStyle;
  }
  if (!Util.isUnset(request.apAssetId)) {
    query['ApAssetId'] = request.apAssetId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appData)) {
    query['AppData'] = request.appData;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.category)) {
    query['Category'] = request.category;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.thirdAppName)) {
    query['ThirdAppName'] = request.thirdAppName;
  }
  if (!Util.isUnset(request.version)) {
    query['Version'] = request.version;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApThirdApp',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApThirdApp(request: SaveApThirdAppRequest): SaveApThirdAppResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApThirdAppWithOptions(request, runtime);
}

model SaveApgroupBasicConfigRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  country?: string(name='Country'),
  dai?: string(name='Dai'),
  description?: string(name='Description'),
  echoInt?: int32(name='EchoInt'),
  failover?: int32(name='Failover'),
  id?: long(name='Id'),
  insecureAllowed?: int32(name='InsecureAllowed'),
  isConfigStrongConsistency?: boolean(name='IsConfigStrongConsistency', example='false'),
  lanIp?: string(name='LanIp'),
  lanMask?: string(name='LanMask'),
  lanStatus?: int32(name='LanStatus'),
  logIp?: string(name='LogIp'),
  logLevel?: int32(name='LogLevel'),
  name?: string(name='Name'),
  parentApgroupId?: long(name='ParentApgroupId'),
  passwd?: string(name='Passwd'),
  protocol?: string(name='Protocol'),
  route?: string(name='Route'),
  scan?: int32(name='Scan'),
  tokenServer?: string(name='TokenServer'),
  vpn?: string(name='Vpn'),
  workMode?: int32(name='WorkMode'),
}

model SaveApgroupBasicConfigResponseBody = {
  data?: {
    id?: long(name='Id'),
    taskId?: string(name='TaskId'),
  }(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApgroupBasicConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApgroupBasicConfigResponseBody(name='body'),
}

async function saveApgroupBasicConfigWithOptions(request: SaveApgroupBasicConfigRequest, runtime: Util.RuntimeOptions): SaveApgroupBasicConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.country)) {
    query['Country'] = request.country;
  }
  if (!Util.isUnset(request.dai)) {
    query['Dai'] = request.dai;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.echoInt)) {
    query['EchoInt'] = request.echoInt;
  }
  if (!Util.isUnset(request.failover)) {
    query['Failover'] = request.failover;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.insecureAllowed)) {
    query['InsecureAllowed'] = request.insecureAllowed;
  }
  if (!Util.isUnset(request.isConfigStrongConsistency)) {
    query['IsConfigStrongConsistency'] = request.isConfigStrongConsistency;
  }
  if (!Util.isUnset(request.lanIp)) {
    query['LanIp'] = request.lanIp;
  }
  if (!Util.isUnset(request.lanMask)) {
    query['LanMask'] = request.lanMask;
  }
  if (!Util.isUnset(request.lanStatus)) {
    query['LanStatus'] = request.lanStatus;
  }
  if (!Util.isUnset(request.logIp)) {
    query['LogIp'] = request.logIp;
  }
  if (!Util.isUnset(request.logLevel)) {
    query['LogLevel'] = request.logLevel;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.parentApgroupId)) {
    query['ParentApgroupId'] = request.parentApgroupId;
  }
  if (!Util.isUnset(request.passwd)) {
    query['Passwd'] = request.passwd;
  }
  if (!Util.isUnset(request.protocol)) {
    query['Protocol'] = request.protocol;
  }
  if (!Util.isUnset(request.route)) {
    query['Route'] = request.route;
  }
  if (!Util.isUnset(request.scan)) {
    query['Scan'] = request.scan;
  }
  if (!Util.isUnset(request.tokenServer)) {
    query['TokenServer'] = request.tokenServer;
  }
  if (!Util.isUnset(request.vpn)) {
    query['Vpn'] = request.vpn;
  }
  if (!Util.isUnset(request.workMode)) {
    query['WorkMode'] = request.workMode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApgroupBasicConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApgroupBasicConfig(request: SaveApgroupBasicConfigRequest): SaveApgroupBasicConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApgroupBasicConfigWithOptions(request, runtime);
}

model SaveApgroupPortalConfigRequest {
  apgroupId?: long(name='ApgroupId'),
  appAuthUrl?: string(name='AppAuthUrl'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  authKey?: string(name='AuthKey'),
  authSecret?: string(name='AuthSecret'),
  checkUrl?: string(name='CheckUrl'),
  clientDownload?: int32(name='ClientDownload'),
  clientUpload?: int32(name='ClientUpload'),
  countdown?: int32(name='Countdown'),
  network?: int32(name='Network'),
  portalTypes?: [ string ](name='PortalTypes'),
  portalUrl?: string(name='PortalUrl'),
  timeStamp?: long(name='TimeStamp'),
  totalDownload?: int32(name='TotalDownload'),
  totalUpload?: int32(name='TotalUpload'),
  webAuthUrl?: string(name='WebAuthUrl'),
  whitelist?: string(name='Whitelist'),
}

model SaveApgroupPortalConfigShrinkRequest {
  apgroupId?: long(name='ApgroupId'),
  appAuthUrl?: string(name='AppAuthUrl'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  authKey?: string(name='AuthKey'),
  authSecret?: string(name='AuthSecret'),
  checkUrl?: string(name='CheckUrl'),
  clientDownload?: int32(name='ClientDownload'),
  clientUpload?: int32(name='ClientUpload'),
  countdown?: int32(name='Countdown'),
  network?: int32(name='Network'),
  portalTypesShrink?: string(name='PortalTypes'),
  portalUrl?: string(name='PortalUrl'),
  timeStamp?: long(name='TimeStamp'),
  totalDownload?: int32(name='TotalDownload'),
  totalUpload?: int32(name='TotalUpload'),
  webAuthUrl?: string(name='WebAuthUrl'),
  whitelist?: string(name='Whitelist'),
}

model SaveApgroupPortalConfigResponseBody = {
  data?: [ long ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model SaveApgroupPortalConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApgroupPortalConfigResponseBody(name='body'),
}

async function saveApgroupPortalConfigWithOptions(tmpReq: SaveApgroupPortalConfigRequest, runtime: Util.RuntimeOptions): SaveApgroupPortalConfigResponse {
  Util.validateModel(tmpReq);
  var request = new SaveApgroupPortalConfigShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.portalTypes)) {
    request.portalTypesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.portalTypes, 'PortalTypes', 'simple');
  }
  var query = {};
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.appAuthUrl)) {
    query['AppAuthUrl'] = request.appAuthUrl;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.authKey)) {
    query['AuthKey'] = request.authKey;
  }
  if (!Util.isUnset(request.authSecret)) {
    query['AuthSecret'] = request.authSecret;
  }
  if (!Util.isUnset(request.checkUrl)) {
    query['CheckUrl'] = request.checkUrl;
  }
  if (!Util.isUnset(request.clientDownload)) {
    query['ClientDownload'] = request.clientDownload;
  }
  if (!Util.isUnset(request.clientUpload)) {
    query['ClientUpload'] = request.clientUpload;
  }
  if (!Util.isUnset(request.countdown)) {
    query['Countdown'] = request.countdown;
  }
  if (!Util.isUnset(request.network)) {
    query['Network'] = request.network;
  }
  if (!Util.isUnset(request.portalTypesShrink)) {
    query['PortalTypes'] = request.portalTypesShrink;
  }
  if (!Util.isUnset(request.portalUrl)) {
    query['PortalUrl'] = request.portalUrl;
  }
  if (!Util.isUnset(request.timeStamp)) {
    query['TimeStamp'] = request.timeStamp;
  }
  if (!Util.isUnset(request.totalDownload)) {
    query['TotalDownload'] = request.totalDownload;
  }
  if (!Util.isUnset(request.totalUpload)) {
    query['TotalUpload'] = request.totalUpload;
  }
  if (!Util.isUnset(request.webAuthUrl)) {
    query['WebAuthUrl'] = request.webAuthUrl;
  }
  if (!Util.isUnset(request.whitelist)) {
    query['Whitelist'] = request.whitelist;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApgroupPortalConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApgroupPortalConfig(request: SaveApgroupPortalConfigRequest): SaveApgroupPortalConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApgroupPortalConfigWithOptions(request, runtime);
}

model SaveApgroupSsidConfigRequest {
  acctPort?: int32(name='AcctPort'),
  acctSecret?: string(name='AcctSecret'),
  acctServer?: string(name='AcctServer'),
  apgroupId?: string(name='ApgroupId'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  authCache?: string(name='AuthCache'),
  authPort?: int32(name='AuthPort'),
  authSecret?: string(name='AuthSecret'),
  authServer?: string(name='AuthServer'),
  binding?: string(name='Binding'),
  cir?: long(name='Cir'),
  daeClient?: string(name='DaeClient'),
  daePort?: int32(name='DaePort'),
  daeSecret?: string(name='DaeSecret'),
  disabled?: string(name='Disabled'),
  disassocLowAck?: string(name='DisassocLowAck'),
  disassocWeakRssi?: int32(name='DisassocWeakRssi'),
  dynamicVlan?: int32(name='DynamicVlan'),
  effect?: boolean(name='Effect'),
  encKey?: string(name='EncKey'),
  encryption?: string(name='Encryption'),
  hidden?: string(name='Hidden'),
  id?: long(name='Id'),
  ieee80211w?: string(name='Ieee80211w'),
  ignoreWeakProbe?: int32(name='IgnoreWeakProbe'),
  isolate?: string(name='Isolate'),
  liteEffect?: boolean(name='LiteEffect'),
  maxInactivity?: int32(name='MaxInactivity'),
  maxassoc?: string(name='Maxassoc'),
  multicastForward?: int32(name='MulticastForward'),
  nasid?: string(name='Nasid'),
  network?: int32(name='Network'),
  newSsid?: string(name='NewSsid'),
  ownip?: string(name='Ownip'),
  secondaryAcctPort?: int32(name='SecondaryAcctPort'),
  secondaryAcctSecret?: string(name='SecondaryAcctSecret'),
  secondaryAcctServer?: string(name='SecondaryAcctServer'),
  secondaryAuthPort?: int32(name='SecondaryAuthPort'),
  secondaryAuthSecret?: string(name='SecondaryAuthSecret'),
  secondaryAuthServer?: string(name='SecondaryAuthServer'),
  shortPreamble?: string(name='ShortPreamble'),
  ssid?: string(name='Ssid'),
  ssidLb?: int32(name='SsidLb'),
  type?: int32(name='Type'),
  vlanDhcp?: int32(name='VlanDhcp'),
  wmm?: string(name='Wmm'),
}

model SaveApgroupSsidConfigResponseBody = {
  data?: [ long ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model SaveApgroupSsidConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveApgroupSsidConfigResponseBody(name='body'),
}

async function saveApgroupSsidConfigWithOptions(request: SaveApgroupSsidConfigRequest, runtime: Util.RuntimeOptions): SaveApgroupSsidConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.acctPort)) {
    query['AcctPort'] = request.acctPort;
  }
  if (!Util.isUnset(request.acctSecret)) {
    query['AcctSecret'] = request.acctSecret;
  }
  if (!Util.isUnset(request.acctServer)) {
    query['AcctServer'] = request.acctServer;
  }
  if (!Util.isUnset(request.apgroupId)) {
    query['ApgroupId'] = request.apgroupId;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.authCache)) {
    query['AuthCache'] = request.authCache;
  }
  if (!Util.isUnset(request.authPort)) {
    query['AuthPort'] = request.authPort;
  }
  if (!Util.isUnset(request.authSecret)) {
    query['AuthSecret'] = request.authSecret;
  }
  if (!Util.isUnset(request.authServer)) {
    query['AuthServer'] = request.authServer;
  }
  if (!Util.isUnset(request.binding)) {
    query['Binding'] = request.binding;
  }
  if (!Util.isUnset(request.cir)) {
    query['Cir'] = request.cir;
  }
  if (!Util.isUnset(request.daeClient)) {
    query['DaeClient'] = request.daeClient;
  }
  if (!Util.isUnset(request.daePort)) {
    query['DaePort'] = request.daePort;
  }
  if (!Util.isUnset(request.daeSecret)) {
    query['DaeSecret'] = request.daeSecret;
  }
  if (!Util.isUnset(request.disabled)) {
    query['Disabled'] = request.disabled;
  }
  if (!Util.isUnset(request.disassocLowAck)) {
    query['DisassocLowAck'] = request.disassocLowAck;
  }
  if (!Util.isUnset(request.disassocWeakRssi)) {
    query['DisassocWeakRssi'] = request.disassocWeakRssi;
  }
  if (!Util.isUnset(request.dynamicVlan)) {
    query['DynamicVlan'] = request.dynamicVlan;
  }
  if (!Util.isUnset(request.effect)) {
    query['Effect'] = request.effect;
  }
  if (!Util.isUnset(request.encKey)) {
    query['EncKey'] = request.encKey;
  }
  if (!Util.isUnset(request.encryption)) {
    query['Encryption'] = request.encryption;
  }
  if (!Util.isUnset(request.hidden)) {
    query['Hidden'] = request.hidden;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.ieee80211w)) {
    query['Ieee80211w'] = request.ieee80211w;
  }
  if (!Util.isUnset(request.ignoreWeakProbe)) {
    query['IgnoreWeakProbe'] = request.ignoreWeakProbe;
  }
  if (!Util.isUnset(request.isolate)) {
    query['Isolate'] = request.isolate;
  }
  if (!Util.isUnset(request.liteEffect)) {
    query['LiteEffect'] = request.liteEffect;
  }
  if (!Util.isUnset(request.maxInactivity)) {
    query['MaxInactivity'] = request.maxInactivity;
  }
  if (!Util.isUnset(request.maxassoc)) {
    query['Maxassoc'] = request.maxassoc;
  }
  if (!Util.isUnset(request.multicastForward)) {
    query['MulticastForward'] = request.multicastForward;
  }
  if (!Util.isUnset(request.nasid)) {
    query['Nasid'] = request.nasid;
  }
  if (!Util.isUnset(request.network)) {
    query['Network'] = request.network;
  }
  if (!Util.isUnset(request.newSsid)) {
    query['NewSsid'] = request.newSsid;
  }
  if (!Util.isUnset(request.ownip)) {
    query['Ownip'] = request.ownip;
  }
  if (!Util.isUnset(request.secondaryAcctPort)) {
    query['SecondaryAcctPort'] = request.secondaryAcctPort;
  }
  if (!Util.isUnset(request.secondaryAcctSecret)) {
    query['SecondaryAcctSecret'] = request.secondaryAcctSecret;
  }
  if (!Util.isUnset(request.secondaryAcctServer)) {
    query['SecondaryAcctServer'] = request.secondaryAcctServer;
  }
  if (!Util.isUnset(request.secondaryAuthPort)) {
    query['SecondaryAuthPort'] = request.secondaryAuthPort;
  }
  if (!Util.isUnset(request.secondaryAuthSecret)) {
    query['SecondaryAuthSecret'] = request.secondaryAuthSecret;
  }
  if (!Util.isUnset(request.secondaryAuthServer)) {
    query['SecondaryAuthServer'] = request.secondaryAuthServer;
  }
  if (!Util.isUnset(request.shortPreamble)) {
    query['ShortPreamble'] = request.shortPreamble;
  }
  if (!Util.isUnset(request.ssid)) {
    query['Ssid'] = request.ssid;
  }
  if (!Util.isUnset(request.ssidLb)) {
    query['SsidLb'] = request.ssidLb;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.vlanDhcp)) {
    query['VlanDhcp'] = request.vlanDhcp;
  }
  if (!Util.isUnset(request.wmm)) {
    query['Wmm'] = request.wmm;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SaveApgroupSsidConfig',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveApgroupSsidConfig(request: SaveApgroupSsidConfigRequest): SaveApgroupSsidConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveApgroupSsidConfigWithOptions(request, runtime);
}

model SetApAddressRequest {
  apAreaName?: string(name='ApAreaName'),
  apBuildingName?: string(name='ApBuildingName'),
  apCampusName?: string(name='ApCampusName'),
  apCityName?: string(name='ApCityName'),
  apFloor?: string(name='ApFloor'),
  apGroup?: string(name='ApGroup'),
  apName?: string(name='ApName'),
  apNationName?: string(name='ApNationName'),
  apProvinceName?: string(name='ApProvinceName'),
  apUnitId?: long(name='ApUnitId'),
  apUnitName?: string(name='ApUnitName'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  direction?: string(name='Direction'),
  language?: string(name='Language'),
  lat?: string(name='Lat'),
  lng?: string(name='Lng'),
  mac?: string(name='Mac'),
}

model SetApAddressResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model SetApAddressResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetApAddressResponseBody(name='body'),
}

async function setApAddressWithOptions(request: SetApAddressRequest, runtime: Util.RuntimeOptions): SetApAddressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apAreaName)) {
    query['ApAreaName'] = request.apAreaName;
  }
  if (!Util.isUnset(request.apBuildingName)) {
    query['ApBuildingName'] = request.apBuildingName;
  }
  if (!Util.isUnset(request.apCampusName)) {
    query['ApCampusName'] = request.apCampusName;
  }
  if (!Util.isUnset(request.apCityName)) {
    query['ApCityName'] = request.apCityName;
  }
  if (!Util.isUnset(request.apFloor)) {
    query['ApFloor'] = request.apFloor;
  }
  if (!Util.isUnset(request.apGroup)) {
    query['ApGroup'] = request.apGroup;
  }
  if (!Util.isUnset(request.apName)) {
    query['ApName'] = request.apName;
  }
  if (!Util.isUnset(request.apNationName)) {
    query['ApNationName'] = request.apNationName;
  }
  if (!Util.isUnset(request.apProvinceName)) {
    query['ApProvinceName'] = request.apProvinceName;
  }
  if (!Util.isUnset(request.apUnitId)) {
    query['ApUnitId'] = request.apUnitId;
  }
  if (!Util.isUnset(request.apUnitName)) {
    query['ApUnitName'] = request.apUnitName;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.direction)) {
    query['Direction'] = request.direction;
  }
  if (!Util.isUnset(request.language)) {
    query['Language'] = request.language;
  }
  if (!Util.isUnset(request.lat)) {
    query['Lat'] = request.lat;
  }
  if (!Util.isUnset(request.lng)) {
    query['Lng'] = request.lng;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetApAddress',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setApAddress(request: SetApAddressRequest): SetApAddressResponse {
  var runtime = new Util.RuntimeOptions{};
  return setApAddressWithOptions(request, runtime);
}

model SetApNameRequest {
  apMac?: string(name='ApMac'),
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  name?: string(name='Name'),
}

model SetApNameResponseBody = {
  data?: string(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
}

model SetApNameResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetApNameResponseBody(name='body'),
}

async function setApNameWithOptions(request: SetApNameRequest, runtime: Util.RuntimeOptions): SetApNameResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apMac)) {
    query['ApMac'] = request.apMac;
  }
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SetApName',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setApName(request: SetApNameRequest): SetApNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return setApNameWithOptions(request, runtime);
}

model UnRegisterApAssetRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  assetApgroupId?: long(name='AssetApgroupId'),
  category?: int32(name='Category'),
  id?: long(name='Id'),
  mac?: string(name='Mac'),
  serialNo?: string(name='SerialNo'),
  useFor?: int32(name='UseFor'),
}

model UnRegisterApAssetResponseBody = {
  data?: map[string]any(name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model UnRegisterApAssetResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnRegisterApAssetResponseBody(name='body'),
}

async function unRegisterApAssetWithOptions(request: UnRegisterApAssetRequest, runtime: Util.RuntimeOptions): UnRegisterApAssetResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.assetApgroupId)) {
    query['AssetApgroupId'] = request.assetApgroupId;
  }
  if (!Util.isUnset(request.category)) {
    query['Category'] = request.category;
  }
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.mac)) {
    query['Mac'] = request.mac;
  }
  if (!Util.isUnset(request.serialNo)) {
    query['SerialNo'] = request.serialNo;
  }
  if (!Util.isUnset(request.useFor)) {
    query['UseFor'] = request.useFor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UnRegisterApAsset',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unRegisterApAsset(request: UnRegisterApAssetRequest): UnRegisterApAssetResponse {
  var runtime = new Util.RuntimeOptions{};
  return unRegisterApAssetWithOptions(request, runtime);
}

model UpdateNetDeviceInfoRequest {
  appCode?: string(name='AppCode'),
  appName?: string(name='AppName'),
  devices?: [ 
    {
      hostName?: string(name='HostName'),
      id?: long(name='Id'),
      idc?: string(name='Idc'),
      logicNetPod?: string(name='LogicNetPod'),
      manufacturer?: string(name='Manufacturer'),
      mgnIp?: string(name='MgnIp'),
      model?: string(name='Model'),
      netPod?: string(name='NetPod'),
      password?: string(name='Password'),
      role?: string(name='Role'),
      serviceTag?: string(name='ServiceTag'),
      username?: string(name='Username'),
    }
  ](name='Devices'),
  requestId?: string(name='RequestId'),
}

model UpdateNetDeviceInfoResponseBody = {
  data?: [ long ](name='Data'),
  errorCode?: int32(name='ErrorCode'),
  errorMessage?: string(name='ErrorMessage'),
  isSuccess?: boolean(name='IsSuccess'),
  requestId?: string(name='RequestId'),
}

model UpdateNetDeviceInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateNetDeviceInfoResponseBody(name='body'),
}

async function updateNetDeviceInfoWithOptions(request: UpdateNetDeviceInfoRequest, runtime: Util.RuntimeOptions): UpdateNetDeviceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appCode)) {
    query['AppCode'] = request.appCode;
  }
  if (!Util.isUnset(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.requestId)) {
    query['RequestId'] = request.requestId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.devices)) {
    body['Devices'] = request.devices;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateNetDeviceInfo',
    version = '2019-11-18',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateNetDeviceInfo(request: UpdateNetDeviceInfoRequest): UpdateNetDeviceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateNetDeviceInfoWithOptions(request, runtime);
}

